const app = getApp()
Page({
  data: {
   healthData: []
  },
  onLoad: function () {
    wx.request({
      url: app.globalData.serverUrl + '/healths/byOpenid/' + wx.getStorageSync('userInfo').openid,
      method: 'GET',
      success: (res) => {
        if (res.data.status == 200) {
          this.setData({
            healthData: res.data.data
          })
        }
        console.log(this.data.healthData)
      },
      fail: function (error) {
        console.log(error)
        //调用服务端接口失败
        wx.showToast({
          title: '调用服务端接口失败',
          icon: 'none',
          duration: 2000
        })
      }
    })

    
  }
  
 })